package com.huaxia.day19;

import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.*;

// 不可以为private修饰
public class Test2 {
    public static void main(String[] args){
//        test1();
        test5();
    }

    public static void test1(){
        for(int x =0;x<5;x++)
        {
            if(x%2==0)
                break;
            System.out.print(x+" ");
        }

    }

    public static void test2(){
        Properties p = new Properties();
        p.setProperty("userame", "tom");
        Enumeration names = p.propertyNames();
        while (names.hasMoreElements()) {
            String key = (String) names.nextElement();
            String value = p.getProperty(key);
            System.out.println(key + " = " + value);
        }

    }

    public static void test3(){
        try{
            int x = div(1,2);
        }catch(Exception e){
            System.out.println(e);
        }
       // System.out.println(x);
    }



    public static void test4(){
        int a = 3;
        int b = 6;
        System.out.print(a==b);
        System.out.print(a<b);
        System.out.print(a!=b);
        System.out.print(a>=b);

    }


    public static void test5(){
        HashSet<String> hs = new HashSet<String>();
        hs.add("1234");
        hs.add("1234");
        hs.add("12");
        System.out.println(hs);

    }

    public static int div(int a,int b){
        return a / b ;
    }

}
